/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package portal;

import java.io.File;

/**
 *
 * @author rory
 */
public class AvailableWorkflows {

    private String[] filesInDir;

    public String[] getFilesInDir() {
        return filesInDir;
    }

    public void setFilesInDir(String[] in) {
        filesInDir = in;
    }

    public String[] showWorkflows() throws Exception {

        System.out.println("testing");

        // create a file that is really a directory
        File aDirectory = new File("wf_data");

        // get a listing of all files in the directory
        filesInDir = aDirectory.list();

        for (int i = 0; i < filesInDir.length; i++) {
            System.out.println("file: " + filesInDir[i].substring(0, filesInDir[i].lastIndexOf('.')));
            filesInDir[i] = filesInDir[i].substring(0, filesInDir[i].lastIndexOf('.'));
        }



        System.out.println("Add");

        return filesInDir;
    }
}
